export default {
  name: 'Header',
  created () {
    window.onscroll = () => {
      const scrollTop = document.documentElement.scrollTop || document.body.scrollTop
      if (scrollTop > 120) {
        this.navTop = true
      } else {
        this.navTop = false
      }
    }
  },
  data () {
    return {
      navTop: false
    }
  },
  beforeDestroy () {
    window.onscroll = null
  }
}
